package com.nescafe.nescafepromo.util;

import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public abstract class FormatUtil {

	public static DateFormat dbDateFormat = new SimpleDateFormat("yyyyMMdd");
	public static DateFormat displayDateFormt = new SimpleDateFormat("MMMM d, yyyy");
	public static DecimalFormat totalPointsFormat = new DecimalFormat("###,###");
	public static DecimalFormat amountFormat = new DecimalFormat("###,###.00");

	public static String formatDate(Date date) {
		return dbDateFormat.format(date);
	}

	public static String formatPoints(long points) {
		return totalPointsFormat.format(points);
	}

	public static String formatAmount(double amount) {
		return amountFormat.format(amount);
	}

}
